package org.example.order;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(path = "/param")
public class ParamController {

    @SentinelResource("paramFlowTestByPathVariable")
    @GetMapping(path = "/{id}")
    public String paramTest1(@PathVariable("id") String id) {
        return "path param test id: " + id;
    }

    @SentinelResource("paramFlowTestByQueryParam")
    @GetMapping
    public String paramTest2(@RequestParam("id") String id) {
        return "query param test id: " + id;
    }

}
